# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=gtk-doc
pkgver=1.29
pkgrel=1
pkgdesc="Documentation tool for public library API"
url="https://www.gtk.org/gtk-doc/"
arch=(any)
license=(GPL FDL)
depends=(docbook-xsl docbook-xml source-highlight glib2-docs python-lxml
         python-pygments python-anytree)
makedepends=(dblatex git yelp-tools)
checkdepends=(bc gtk3 python-six)
optdepends=('dblatex: PDF support')
_commit=7db567e83fe5d2d0659560c6dfb25ee27b338140  # tags/GTK_DOC_1_29^0
source=("git+https://gitlab.gnome.org/GNOME/gtk-doc.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed -e 's/GTK_DOC_//' -e 's/_/\./g' -e 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --disable-static
  make
}

check() {
  cd $pkgname
  make check
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
